home *** CD-ROM | disk | FTP | other *** search
- Path: newsource.ihug.co.nz!news
- From: dongf@pcnet.co.nz (Dong-Hang Fong)
- Newsgroups: comp.programming,comp.lang.c++,comp.lang.pascal.misc
- Subject: Re: How to convert octal-binary?
- Date: Wed, 03 Jan 1996 08:15:30 GMT
- Organization: The Internet Group
- Message-ID: <4ceoi9$5ra@newsource.ihug.co.nz>
- References: <4c0nhf$hnl@nyheter.chalmers.se>
- NNTP-Posting-Host: 206.101.216.24
- X-Newsreader: Forte Free Agent 1.0.82
-
- christian.almstrand@elektro.ing.hb.se (Cristian Almstrand) wrote:
-
- >I really need to know if someone knows about any algoritm to
- >convert from a octal value to a hexadecimal or binary?
-
- >If you know where to find such an iformation - please let me know.
- >All hints are welcome.
-
- >Thanks,
- >Cristian
-
- Well, each digit of octal number can be imaged into a three- digit
- binary number.
- 0 ---- 000, 1 ----- 001, 2 ----- 010, 3 ----- 011, 4 ----- 100, 5
- ----- 101, 6 ----- 110, 7 ----- 111.
- So, you can convert a octal value to a binary one directly.
- e.g.
- 123o = 001 010 011b
-
- Cheers,
- Dong-Hang Fong
-
-